﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using FreeSqlExtensions;
using Newtonsoft.Json;

namespace LightLog.Entity
{
    /// <summary>
    /// 日志信息
    /// </summary>
    [JsonObject(MemberSerialization.OptIn)]
    [Table(Name = "LogInfo")]
    [Serializable]
    public partial class LogInfo : SnowflakEntity
    {
        /// <summary>
        /// 项目编码
        /// </summary>
        [Column(StringLength = 50)]
        public string ProjectCode { get; set; } = "";

        /// <summary>
        /// 异常编码
        /// </summary>
        [Column(StringLength = 50)]
        public string ErrorCode { get; set; } = "";

        /// <summary>
        /// 发送者
        /// </summary>
        [Column(StringLength = 50)]
        public string Sender { get; set; } = "";

        /// <summary>
        /// 发送ip
        /// </summary>
        [Column(StringLength = 50)]
        public string IP { get; set; } = "";

        /// <summary>
        /// 客户端系统信息
        /// </summary>
        [Column(StringLength = 500)] 
        public string ClientSystem  { get; set; } = "";

        /// <summary>
        /// 程序版本号
        /// </summary>
        [Column(StringLength = 50)] 
        public string Version { get; set; } = "";

        /// <summary>
        /// 日志级别(Verbose,Information,Debug,Warning,Error,Fatal)
        /// </summary>
        [Column(StringLength = 20)] 
        public string LogLevel { get; set; } = "";

        /// <summary>
        /// 异常类型
        /// </summary>
        [Column(StringLength = 50)] 
        public string ExceptionName { get; set; } = "";

        /// <summary>
        /// 异常信息
        /// </summary>
        [Column(StringLength = -2)] 
        public string ExceptionInfo { get; set; } = "";

        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime CreateTime { get; set; }=DateTime.Now;

    }
}
